package extenddemo;

/**
 * Created by fanshaohua on 2017/11/5.
 */
public class RichFather extends GrandPa{
    public RichFather() {

        //this("123131233131313");  //this代表本类的构造器 public RichFather(String money)

        System.out.println("老爹的无参构造器");

    }

    public RichFather(String money) {
        System.out.println("老爹的有参构造器");
        this.money = money;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    private String money;

    public void bigHouse(){
        System.out.println("老爹住别墅");

    }

    public void fancyCar(){
        System.out.println("老爹开豪车");
    }
}
